Heap Dump

A heap dump is a dump of the state of the Java heap memory. This is useful for analyzing the use of memory i.e. an application is making at some point in time so handy in diagnosing some memory issues, and if done at intervals, handy in diagnosing memory leaks. In the dashboard, an option is provided for taking heap dump.

Take Heap Dump

You need to follow the below mentioned steps to take a Heap dump:

  1. Go to Actions > Heap Dump The heap dump window is displayed, select the tier and server.
Figure 27: Heap Dump Window

2. To get all instances of the selected tier and server, click the All For ND instances, click the ND  button. A list of instances is displayed with the related information, such as:  process ID, instance name, and process arguments.

Figure 28: Heap Dump Instance

3. You can take a heap dump after selecting the PID of a particular selected Tier concerning the Server.

4. Click Take Heap Dump button for taking the heap dump.

5. Mention the heap dump file name with the full path of storage.

Figure 29: Heap Dump Setting Window

6. Click Apply After the successful heap dump at the specified path, a confirmation message is displayed as shown in the below figure.

Figure 30: Confirmation Message

7. For ND instances, you can apply some settings on the heap dump window. These settings include download configuration – whether to keep a copy on the server, whether to download the heap dump file in compressed format along with some other advanced settings.

8. Click the Take Heap Dump System takes the heap dump and displays a confirmation message as shown in Figure 30.

9. To download the heap dump files, click the Heap Dump List This displays a list of heap dump files.

Figure 31: Heap Dump List Button

10. Click the Download icon  corresponding to the file to download it.

Figure 32: Heap Dump Manager

Analyze Heap Dump

Once the heap dump is taken, you can analyze the heap dump. There are the following options from where you can analyze it:

  • From Actions > Heap dump > Heap dump list > Heap analyzer icon.
  • From Tier > Server > Instance graph > Widget menu > Diagnostics > Heap dump > Heap dump list > Heap analyzer icon.
  • From Actions > Heap dump > Heap dump list > Analyze from local.
  • From Actions > Heap dump > Heap dump list > Analyze from NDE Box.
Figure 33

After clicking the Analyzer Heap  icon, it parses the heap dump file and displays the Java Heap dump analyzer window.

Figure 34: Heap Dump Analyzer

This window further contains the following tabs:

  • System Overview
  • Leak Suspects
  • Top components

System Overview

This tab contains the following details:

Heap Dump Overview

Figure 35: Heap Dump Overview

System Properties

Figure 36: System Properties

Thread Overview

Figure 37: Thread Overview

Top Consumers

Figure 38: Top Consumers

Class Histogram

Figure 39: Class Histogram

Leak Suspects

This tab displays the overview of leaks, Problem suspects, and other details.

Leaks

Figure 40: Leaks

Problem Suspects

Figure 41: Problem Suspects

Top Components

This tab contains information about the top consumers, Retained set, possible memory waste, soft memory stats, and weak memory stats.

Figure 42: Top Consumers

Analyze Java Heap Dump from Local

You can also analyze heap dump from local sources.

  1. Click the Analyze Heap from Local
Figure 43: Analyze Heap from Local

2. Select the heap dump file from the local.

Figure 44: Heap Dump File

3. The uploaded heap dump file is parsed and displayed on the window.

Figure 45: Uploaded Heap Dump

4. Once it is parsed, the Heap Dump Analyzer window is displayed.

Figure 46: Heap Dump Analyzer Window

 

Note: If you click the ‘Close’ icon, it does not cancel the file uploading process, it just hides the file uploading status.